- Author:
- Soroush Safaei <ssaf006@aucklanduni.ac.nz>
- Date:
- 2017-08-15 23:51:15+12:00
- Desc:
- Circulation model diagrams
- Permanent Source URI:
- https://models.cellml.org/workspace/43b/rawfile/100a3775a55fd9e315d9ada3c75a578c800d04f5/BG Tutorial Electrical Systems/Electrical 3.cellml
<?xml version='1.0'?>
<model name="BG3" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#">
<!-- Simple bond graph model-->
<units name="J_per_C">
<unit units="joule"/>
<unit exponent="-1" units="coulomb"/>
</units>
<units name="C_per_s">
<unit units="coulomb"/>
<unit exponent="-1" units="second"/>
</units>
<units name="C_per_s2">
<unit units="coulomb"/>
<unit exponent="-2" units="second"/>
</units>
<units name="C2_per_J">
<unit exponent="2" units="coulomb"/>
<unit exponent="-1" units="joule"/>
</units>
<units name="Js_per_C2">
<unit units="joule"/>
<unit units="second"/>
<unit exponent="-2" units="coulomb"/>
</units>
<units name="Js2_per_C2">
<unit units="joule"/>
<unit exponent="2" units="second"/>
<unit exponent="-2" units="coulomb"/>
</units>
<component name="main">
<variable initial_value="0" name="t" units="second"/>
<!-- State variables-->
<variable initial_value="1" name="q1" units="coulomb"/>
<variable initial_value="0" name="q2" units="coulomb"/>
<variable name="v1" units="C_per_s"/>
<variable name="v2" units="C_per_s"/>
<variable initial_value="0" name="v3" units="C_per_s"/>
<variable name="a3" units="C_per_s2"/>
<variable name="u1" units="J_per_C"/>
<variable name="u2" units="J_per_C"/>
<variable name="u3" units="J_per_C"/>
<variable name="u4" units="J_per_C"/>
<variable name="u5" units="J_per_C"/>
<variable name="u6" units="J_per_C"/>
<variable name="u7" units="J_per_C"/>
<!-- Constitutive parameters-->
<variable initial_value="20" name="C1" units="C2_per_J"/>
<variable initial_value="10" name="C2" units="C2_per_J"/>
<variable initial_value="2" name="R1" units="Js_per_C2"/>
<variable initial_value="2" name="R2" units="Js_per_C2"/>
<variable initial_value="2" name="R3" units="Js_per_C2"/>
<variable initial_value="2" name="R4" units="Js_per_C2"/>
<variable initial_value="10" name="L1" units="Js2_per_C2"/>
<!-- Conservation laws-->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q1</ci>
</apply>
<apply>
<minus/>
<ci>v1</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q2</ci>
</apply>
<ci>v2</ci>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v3</ci>
</apply>
<ci>a3</ci>
</apply>
<apply>
<eq/>
<ci>v1</ci>
<apply>
<plus/>
<ci>v2</ci>
<ci>v3</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u1</ci>
<apply>
<plus/>
<ci>u2</ci>
<ci>u3</ci>
<ci>u4</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u3</ci>
<apply>
<plus/>
<ci>u5</ci>
<ci>u6</ci>
<ci>u7</ci>
</apply>
</apply>
<!-- Constitutive relations-->
<apply>
<eq/>
<ci>u1</ci>
<apply>
<divide/>
<ci>q1</ci>
<ci>C1</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u2</ci>
<apply>
<times/>
<ci>v1</ci>
<ci>R1</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u3</ci>
<apply>
<divide/>
<ci>q2</ci>
<ci>C2</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u4</ci>
<apply>
<times/>
<ci>v1</ci>
<ci>R4</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u5</ci>
<apply>
<times/>
<ci>v3</ci>
<ci>R2</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u6</ci>
<apply>
<times/>
<ci>a3</ci>
<ci>L1</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u7</ci>
<apply>
<times/>
<ci>v3</ci>
<ci>R3</ci>
</apply>
</apply>
</math>
</component>
</model>